package utils;

import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Logger {
	
	private static String time() {
		DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
		Calendar cal = Calendar.getInstance();
		return (dateFormat.format(cal.getTime()));
	}
	
	public static void log(String context, String msg) {
		// System.out.println(time() + " :: " + context + " :: " + msg);
		Utils.writeFile(new File("log/" + context + "_log"), time() + " :: " + context + " :: " + msg);
	}

}
